package com.wenx.spi;

import java.util.ServiceLoader;

public class SpiMain {

    public static void main(String[] args) {

        ServiceLoader<IHello> serviceLoader = ServiceLoader.load(IHello.class);

        for (IHello next : serviceLoader) {
            System.out.println(next.say("hello"));
        }

    }

}
